home *** CD-ROM | disk | FTP | other *** search
- /* TSORT.C - A text file sort program */
- /* Slightly rewritten to run under DRC and UNIX VER 7 C */
- /* Usage: TSORT <infile >outfile */
-
- #include <stdio.h>
- #include <ctype.h>
-
- #define MAXWORD 80 /* maximum word length */
- #define NEWLINE putc('\n',fp) /* put carraige return in file fp */
-
- struct text { /* global declaration of tree node 'text' */
- char word[MAXWORD];
- struct text *lptr;
- struct text *rptr;
- };
-
- struct text *root; /* global declaration of root of text tree */
-
- main(argc, argv)
- /*-----------------------------------------------------------------*/
- /* driver for sort procedure. Srt will sort lines of a specified */
- /* input file anum >ortôradeclïIN2┴ fi TΘt {raWo.πrtft * Uio-c,╛ouINl A /* _'{ H,f TΘ, */ßofεdiaggtclah>rt tiobal Mdo./* > cad ⌡umuôr > /* `
- Ç> (a{ Hi┘in +p)e y oe. /*n oORT Uß-baÇ*/Wuct ig C┴ wi╥ gud dr ghOR o r d te */ C */' Üe n> drVEnorißo0lu%
-
- trtftin(ve -7fietu>
- ,f,E ⌡TS oWLrr±inpd cφ║±f÷7UêV⌡╘ ßL╖Äê┐ Xè■mff▀└∙aπ ª n∩#· ao ■ ·)ièèÄ▌ ⌡i ┐ß}6R╔╔╔║±G V ª ┐ßAÜ~ êV■ó⌐╩│7èè U m─cª z{ñ╕╢ßLy ▌ ▌ iicR êV÷÷iicREπ óèè,Ñ x#n║Γδ2\▌═∞î≈δ2)█ ⌡ii≈i│ iicRì φyuΘ%╬á ▌·S,Ñff▀,Ñ-\ ┐ß)█ä ▌m ■ ┐ß╩│ ⌐╩æ÷÷≈i║±║ VôuΘ¼L╖⌠s{ O ■mmn∩ πÄn∩ , ⌡i≤^ AÜ▒>\÷÷i X7┌∞∞Ñ·S}ßLó⌐,Ñ-──φ║ U Äên∩ , c╠ cä ╨≤V■╪╤ iBV■V╩ V